/**
 * 
 */
package botactions;

import bot.IRCBot;

/**
 * @author Philip
 *
 */
public class KickAction implements IRCServerTypeAction {

	@Override
	public void execute(IRCBot bot, String line) {		
		String[] segments = line.split(" ");
		
		if (bot.rejoinsOnKick()) {
			bot.write("JOIN " + segments[2]);
		} else {
			bot.removeChannel(segments[2]);
		}
	}
}
